<template>
  <div>
    <group>
      <x-input placeholder="请输入咨询标题" v-model="hotMailTitle"></x-input>
      <x-textarea placeholder="请输入内容" :autosize="true" v-model="hotMailContent"></x-textarea>
    </group>
  </div>
</template>

<script>
  import XInput from 'vux/src/components/x-input/index'
  import XTextarea from 'vux/src/components/x-textarea/index'
  import XButton from 'vux/src/components/x-button/index'
  import Group from 'vux/src/components/group/index'

  export default {
    components: {
      XInput,
      XTextarea,
      XButton,
      Group
    },
    mounted () {
      let url = 'https://ydt.xy12345.cn/edot/person/saveWorkConsult'
      let param = {
        hotMailAim: 2,
        deptCode: this.deptCode,
        deptName: this.deptName,
        hotMailTitle: this.hotMailTitle,
        hotMailContent: this.hotMailContent
      }
      this.$axios.post(url, this.$qs.stringify(param)).then(response => {
        let code = response.data.code
        if (code === 0) {
          return 0
        }
      })
    },
    methods: {
    },
    data () {
      return {
        deptCode: this.$route.params.workCode,
        deptName: this.$route.params.deptName,
        hotMailTitle: '',
        hotMailContent: ''
      }
    }
  }
</script>

<style scoped>
</style>
